# $Id: PKGBUILD 64855 2012-02-18 18:09:40Z lcarlier $
# Contributor: Eric Belanger <eric@archlinux.org>
# Contributor: pukyxd 
# Maintainer: Daenyth <Daenyth+Arch AT gmail DOT com>

pkgname=warmux-data
pkgver=11.04.1
pkgrel=1
pkgdesc="A clone of the worms game - data files"
arch=('any')
url="http://www.wormux.org/"
license=('GPL')
makedepends=('pkgconfig' 'libxml++' 'sdl_image' 'sdl_gfx>=2.0.19' 'sdl_ttf' 'sdl_mixer' 'sdl_net' 'curl>=7.16.2' 'gcc-libs' 'libxml2')
replaces=('wormux')
source=(http://download.gna.org/warmux/warmux-${pkgver}.tar.bz2
        include-zlib.patch
        gcc-fix.patch)
md5sums=('26ff65c43a9bb61a3f0529c98b943e35'
         'c8285955e880f80e3c68312715a3061c'
         '693176b72c9568c0c223be76ea7dd0d2')

build() { 
  cd "${srcdir}/warmux-${pkgver/.1/}"

  # libpng 1.5 fix
  patch -Np1 -i ../include-zlib.patch
  # gcc fix
  patch -Np1 -i ../gcc-fix.patch

  ./configure --prefix=/usr
  make
}

package() {
  cd "${srcdir}/warmux-${pkgver/.1/}/data"

  make DESTDIR="${pkgdir}" install
  rm -r ${pkgdir}/usr/share/{applications,pixmaps}
}
